<%@ taglib prefix="s" uri="/struts-tags" %>
<%--
  Created by IntelliJ IDEA.
  User: wurenjie
  Date: 15/5/9
  Time: 21:48
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title><s:property value="user.username"/> | 用户中心</title>
    <meta name="Description" content="这是一个关于页游舰队Collection的百科网站">
    <meta name="Keywords" content="KancolleWiki,舰娘百科,ACG,舰娘,kancolle">
    <link rel="stylesheet" href="/Public/css/bootstrap.min.css">
    <link rel="stylesheet" href="/Public/css/wikiIndex.css">
</head>
<body>
<div class="body-container">
    <div class="header">
        <div class="header-logo">
            舰娘百科
        </div>
        <div class="navigation-index">
            <ul>
                <li><a href="/wiki/Index" id="nav-index">首页</a></li>
                <li><a href="/wiki/Event" id="nav-event">活动情报</a></li>
                <li><a href="/threads" id="nav-bbs">讨论版</a></li>
                <li><a href="/wiki/Help" id="nav-help">帮助</a></li>
                <li><a href="/register" id="nav-register"></a></li>
                <li><a href="/login" id="nav-login"></a></li>
            </ul>
        </div>
    </div>
    <div class="nav-picture">
        <img src="http://honoka.qiniudn.com/20150523030803770/index-nav.jpg" alt="nav-picture" width="100%" height="420px">
    </div>
    <div class="nav">
        <ul>
            <li><a href="/wiki/User:<s:property value="user.username"/>" id="nav-personalPage">个人主页</a> </li>
            <li><a href="/home" id="nav-setting">个人信息</a></li>
            <li><a href="/history/user/<s:property value="user.id"/>" id="nav-donation">贡献</a></li>
        </ul>
    </div>
    <div class="setting-container">
        <div class="setting-frame">
            <h3>用户设置</h3>
            <hr>
            <p>前往我的公开用户页：<a href="/wiki/User:<s:property value="user.username"/>">User:<s:property value="user.username"/></a></p>
            <p>查看我的历史编辑记录：<a href="/history/user/<s:property value="user.id"/>">贡献列表：<s:property value="user.username"/></a></p>
            <hr>
            <div>
                <div style="padding:2px;border: solid 1px #000000;float:left;">
                <img src="<s:property value="user.avatar"/>" width="150" height="150" alt="avatar" id="ssavater"/>
                </div>
                <div class="clearfix"></div>
            </div>
            <table class="table table-striped">
                <tr>
                    <td>用户名</td>
                    <td><s:property value="user.username"/> </td>
                </tr>
                <tr>
                    <td>注册时间</td>
                    <td><s:property value="sdf.format(user.regtime)"/> </td>
                </tr>
                <tr>
                    <td>密码</td>
                    <td><a href="javascript:;" onclick="open_resetpassword()">修改密码</a></td>
                </tr>
                <tr class="notshow" id="reset_password1">
                    <td>&nbsp;</td>
                    <td>
                        <table class="table">
                            <tr class="notshow" id="rep-m">
                                <td colspan="2">
                                    <div class="alert alert-danger" id="repass-message"></div>
                                </td>
                            </tr>
                        <tr>
                            <td>原密码：</td>
                            <td><input type="password" id="password"/></td>
                        </tr>
                        <tr>
                            <td>新密码：</td>
                            <td><input type="password" id="newpassword"/></td>
                        </tr>
                        <tr>
                            <td>重复新密码：</td>
                            <td><input type="password" id="renewpassword"/></td>
                        </tr>
                        <tr>
                            <td>&nbsp;</td>
                            <td><button class="btn btn-primary" onclick="resetpassword()">提交</button> </td>
                        </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td>头像</td>
                    <td>
                        <a href="javascript:;" onclick="toogleupload()">上传头像</a>
                        <input type="hidden" id="newavatar"/>
                    </td>
                </tr>
            </table>
            <hr>
            <div class="notshow" id="avatarupload-wrap">
                <p>选择图片：</p>
                <p><input type="file" id="file1"></p>
                <p><button class="btn btn-primary" id="startupload" onclick="preupload()">第一步：开始上传</button></p>
                <p id="st" style="background-color: #83ff7e"></p>
            </div>
            <div class="notshow" id="afterupload">
                <img id="lgavatar" src="">
                <p>请在上方图片框中剪裁出合适的头像大小。下面是预览：</p>
                <p><div id="previewbox" style="height:150px;width:150px;overflow:hidden;"><img id="previewavatar" src=""></div></p>
                <p>注意剪裁需要一段时间，可能你的头像显示暂时错误，刷新几次后就会正常显示剪裁后的照片。</p>
                <button class="btn btn-primary" onclick="saveavatar()">第二步：保存头像</button>
                <input type="hidden" id="cropx">
                <input type="hidden" id="cropy">
                <input type="hidden" id="cropw">
                <input type="hidden" id="croph">
                <input type="hidden" id="avatarkey">
            </div>
        </div>
    </div>

    <div class="footer">
        <div class="friend">友情链接:</div>
        <ul class="friend-link">
            <li><a href="http://zh.moegirl.org/">萌娘百科</a></li>
            <li><a href="http://wikiwiki.jp/kancolle"> 艦これ- 攻略 Wiki</a></li>
        </ul>
    </div>
</div>
<script src="/Public/js/jquery.min.js"></script>
<script src="/Public/js/bootstrap.min.js"></script>
<script src="/Public/js/jquery.Jcrop.min.js"></script>
<script src="/Public/js/main.js"></script>
<script src="/Public/js/user.js"></script>
</body>
</html>
